package com.ljx.blog.user.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.RandomUtils;

import java.util.Date;
import java.util.Random;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-10-12  15:22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_user")
public class User {

    private Long id;

    private String avatar;

    private String name;

    private String username;

    private String password;

    private String email;

    private String phone;

    private Long tenantId;

    private String details;

    private Date createTime;

    private Date updateTime;

    private Integer status;

    private Integer ver;

    public User(String username, String password, Long tenantId) {
        this.username = username;
        this.password = password;
        this.tenantId = tenantId;
        this.name = "ikun" + RandomUtils.nextInt();
    }
}
